PreviousNextTracker indexSee it online !

(157/207) 3043117 - search the contrary of an expression

Hi

it would be very usefull to have the possibility to find the contrary of the (maybe regular) expression that we are looking for, like "egrep -v" does

Philippe

Submitted poleta333 - 2010-08-11 - 14:54:23z Assigned nobody
Priority 5 Category core
Status Open Group None
Resolution None Visibility No

Comments

2010-08-21 - 23:03:24z
imsop
I'm not clear what the feature being requested here would do exactly. In a utility like "egrep", you are searching line by line, showing only those lines that match a condition, so the option to show lines which *do not* match the condition makes sense.

But if you do a standard search in an editor, you are searching for any matching string within the file, and highlighting / jumping to that string. In that case, what would an inverted search highlight or jump to? (Given the text "hello kitty, good kitty", what would a search for [not matching "kitty"] do? highlight "hello " and ", good "?)

Do you specifically want a feature to find *lines* not containing a specified search term? Or perhaps *files* not containing it? Do you have a particular use case in mind?
2010-08-31 - 10:21:33z
poleta333
Hi

here is my buffer :

allez les Girondins de Bordeaux !
la meilleure equipe du monde !
et de l'univers !


when I make an hypersearch with "on", it finds :

allez les Girondins de Bordeaux !
la meilleure equipe du monde !


I want to make an inverted hypersearch with "on" which would give :

et de l'univers !

I hope it's more clear now...
2010-08-31 - 11:16:10z
kpouer
In fact not it doesn't find
allez les Girondins de Bordeaux !
la meilleure equipe du monde !

it finds that those two lines contains "on"
The search is not line by line and a searched string can contains several lines.
In fact what you want is a revert grep isn't it ?
2010-08-31 - 14:31:13z
poleta333
my english (and informatic skills :O) are not excellent, so what I'de like to find in Jedit is the same result as "grep -v" does on a file

put my buffer in the file thefile.txt
1/ on unix do : grep on thefile.txt
Jedit do that as well (2 lines out)

2/ on unix do : grep -v on thefile.txt
Jedit does not support such option, on unix I get one line

do you understand my poor english now ?


Philippe
2010-08-31 - 14:31:17z
poleta333
my english (and informatic skills :O) are not excellent, so what I'de like to find in Jedit is the same result as "grep -v" does on a file

put my buffer in the file thefile.txt
1/ on unix do : grep on thefile.txt
Jedit do that as well (2 lines out)

2/ on unix do : grep -v on thefile.txt
Jedit does not support such option, on unix I get one line

do you understand my poor english now ?


Philippe
2010-08-31 - 14:59:18z
kpouer
I understand. I don't know if it is exactly what you need but there is a macro in the "text" submenu :
LineFilter that does something similar to grep
2010-08-31 - 15:03:52z
poleta333
great !

that seems to do the job !

many thanks !

(maybe it would be a good thing to integrate this macro in the find screen...)
2010-08-31 - 15:11:24z
kpouer
for that you can use the new plugin MenuEditor that was released yesterday, it allows you to customize all the menus in jEdit.
So if it is solved can I close this tracker ?
2010-08-31 - 15:16:36z
poleta333
I've checked for that plugin but I haven't found it (the most recent one was RFCReader)... nevertheless, I don't think that this plugin would allow to add a checkbox in the search window...

(I'm really sorry to consume your time, but I'm really keen on Jedit !)

Attachments